﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Ocmf.Types;

namespace Ocmf.Forms
{
    public partial class EditFoodActionForm : Form
    {
        public Food Food { get; set; }

        public EditFoodActionForm(Food food)
        {
            InitializeComponent();

            Food = food;

            numericUpDownFoodChance.Value = new decimal(Food.Chance);
        }

        private void buttonOk_Click(object sender, EventArgs e)
        {
            Food.Chance = decimal.ToSingle(numericUpDownFoodChance.Value);
            DialogResult = System.Windows.Forms.DialogResult.OK;
        }

        private void buttonCancel_Click(object sender, EventArgs e)
        {
            DialogResult = System.Windows.Forms.DialogResult.Cancel;
        }
    }
}
